﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KiDS_Projekat
{
	/// <summary>
	/// Klasa koja predstavlja slave cvor u odnosu na zadati Node
	/// </summary>
	public class Slave
	{
		private double _temperature;
		private ushort _port;
		private string _address;
		private string _location;


		public Slave(string address, ushort port, string location)
		{
			_address = address;
			if (_address == "127.0.0.1" || _address == "0.0.0.0")
				_address = Properties.Settings.Default.DefaultLokacija;
			_port = port;
			_location = location;
		}

		public ushort Port
		{
			get
			{
				return _port;
			}
		}

		public string Location
		{
			get
			{
				return _location;
			}
		}

		public string Address
		{
			get
			{
				return _address;
			}
		}

		public double Temperature
		{
			get
			{
				return _temperature;
			}

			set
			{
				_temperature = value;
			}
		}
	}
}
